<?php
JLoader::register("PCompanyModelThirdAccounts", OC::$SERVERROOT."/apps/company/lib/thirdaccounts.php");

OCP\JSON::callCheck();
if(!OC_User::isLoggedIn()) {
   echo '您需要先登录';
   exit;
} else {
   if (PFactory::isJobseekerUser()) {
      echo "您无权访问该资源！";
      exit;
   }
}

$syncaction = JRequest::getString('syncaction','');
$type = JRequest::getString('type','');

$model = new PCompanyModelThirdAccounts();

if($model->UpdateAutoActionStatus($syncaction,$type,$status = 0)){
   OC_JSON::success();
}else{
   OC_JSON::error();
}
exit;